﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using System.Threading.Tasks;
using VOL.Core.Utilities;
using VOL.Entity.AttributeManager;
using VOL.Entity.DomainModels;
using VOL.SmartMecial.IServices.BasicData;

namespace VOL.WebApi.Controllers.SmartMecial
{
    [Route("api/BasicController")]
    [PermissionTable(Name = "BasicController")]
    public class BasicController : ControllerBase
    {
        private readonly IPrinitService _prinitService;

        public BasicController(IPrinitService prinitService)
        {
            this._prinitService = prinitService;
        }

        [HttpPost("GetPatientList")]
        public async Task<WebResponseContent> GetPatientList([FromBody]GetPatientListDto dto)
        {
            return await _prinitService.GetPatientList(dto.wardAreaCode, dto.bedCode);
        }

        [HttpGet("GetWardAreas")] 
        public async Task<WebResponseContent> GetWardAreas()
        {
            return await _prinitService.GetWardAreas();
        }

    }
    public class GetPatientListDto
    {
        public string? wardAreaCode { get; set; }
       public string? bedCode { get; set; }
    }
}
